<template>
    <!--核心主区域 用来显示数据的-->
    <section class="app-main">
        <!--面包屑-->
        <top-bread ref="topBread"></top-bread>
        <!--tag栏-->
        <top-tag ref="topTag"></top-tag>

        <transition name="fade" mode="out-in">
            <router-view></router-view>
        </transition>
    </section>
</template>

<script>
    // 引入顶部面包屑
    import TopBread from "./TopBread";
    import TopTag from "./TopTag";

    export default {
        name: 'AppMain',
        components:{
            "top-bread":TopBread,
            "top-tag":TopTag
        },
        computed: {
            key() {
                return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
            }
        }
    }
</script>

<style lang="scss" scoped>
.app-main{
    padding: 0;
    margin: 0;
    height: 100%;
    background-color: #fff;
}
</style>
